/*
chars
parse 'fred' 'fred'
parse 'fred ' 'fred'
noparse 'fred barney' '_:*:0, or end-of-input' 6
*/

# Not entirely sure what regression this is testing, but here goes...

{
#include <ctype.h>
}

Start :: char * <- n:Name { ref_dup(n) }
Name ← n:(NameStart NameCont*) _ -> n

NameStart :: void ← c:. &{ isalpha(ref_0(c)) || ref_0(c) == '_' }
NameCont ← c:. &{ isalnum(ref_0(c)) || ref_0(c) == '_' }
_ ← " " *
